package com.yaodian100.ec.giftcard.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_GIFTCARD_AMOUNT")
public class GiftcardAmount extends BaseEntity {

	/** serial version */
	private static final long serialVersionUID = -8485419734163481161L;
	
	/** 禮品卡面額編號 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_giftcard_amount")
	@SequenceGenerator(name = "seq_ec_giftcard_amount", sequenceName = "SEQ_EC_GIFTCARD_AMOUNT")
	@Column(name = "AMOUNT_ID")
	private Long amountId;
	
	/** 禮品卡主檔編號 */
	@Column(name = "MAIN_ID")
	private Long mainId;
	
	/** 面額 */
	@Column(name = "AMOUNT", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal amount;
	
	/** 數量 */
	@Column(name = "COUNT")
	private int count;
	
	/** 已領用數量 */
	@Column(name = "RECEIVE_COUNT")
	private int receiveCount;
	
	/**
	 * 狀態
	 * 申请中 00
	 * 已汇出 10
	 * 已入库 50
	 * 已作废 90
	 */
	@Column(name = "STATUS", length = 6)
	private String status;

	// getter & setter
	public Long getAmountId() {
		return amountId;
	}

	public void setAmountId(Long amountId) {
		this.amountId = amountId;
	}

	public Long getMainId() {
		return mainId;
	}

	public void setMainId(Long mainId) {
		this.mainId = mainId;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getReceiveCount() {
		return receiveCount;
	}

	public void setReceiveCount(int receiveCount) {
		this.receiveCount = receiveCount;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}